package org.amos.upms.listener.kafka;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class BizKafkaConsumer {

    @KafkaListener(topics = "amos-kafka-test")
    public void deviceFlowListen(ConsumerRecord<String, String> record, Acknowledgment ack) {
        log.info("测试信息接收成功，data:{}", record.value());
        ack.acknowledge();
    }
}
